<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">
    <div class="row">
        <div style="background: #ffffff;">
            <form class="form-horizontal" name="dialogDHForm" novalidate>
                <div class="panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><strong>{{'配置课程' | dyLanguage}}</strong></h3>
                    </div>
                    <div class="panel-body panel-dialog">
                        <!--<p>请按照提示设置章节相关勋章的信息。</p>-->
                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'当前课程' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!!currentContent.name">
                                <div class="input-group">
                                    <ul>
                                        <li>{{'名称：' | dyLanguage}}{{currentContent.name}}</li>
                                        <li>{{'类型：' | dyLanguage}}{{currentContent.studyClassType}}</li>
                                    </ul>
                                </div>
                            </div>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left" ng-show="!currentContent.name">
                                <div class="input-group">
                                    <span style="color: red;">{{'无' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'课程' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="queryKey" placeholder="{{'输入课程名称或编码, 点击匹配进行查询' | dyLanguage}}"/>
                                </div>
                            </div>
                            <button class="btn btn-primary" ng-click="findByKey()"><i class="fa fa-search"></i>{{'搜索' | dyLanguage}}</button>
                        </div>

                        <div class="form-group" ng-repeat="result in results">
                            <label class="col-md-3 col-xs-12 control-label"></label>
                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left">
                                <ul>
                                    <li>{{'名称：' | dyLanguage}}{{result.name}}</li>
                                    <li>{{'类型：' | dyLanguage}}{{result.studyClassType}}</li>
                                </ul>
                            </div>
                            <button class="btn btn-info" ng-click="setCurrentContent(result)"><i class="fa fa-plus"></i>{{'匹配' | dyLanguage}}</button>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'排序' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="number" class="form-control" name="sort" ng-model="currentContent.sort" required/>
                                </div>
                                <span class="help-block" ng-show="(validForm.sort.$untouched && !validForm.$submitted) || validForm.sort.$valid">{{'请输入排序' | dyLanguage}}</span>
                            </div>
                        </div>

                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-danger" ng-click="cancel()"><i class="fa fa-times"></i>{{'取消' | dyLanguage}}</button>
                        <button class="btn btn-info" ng-click="submit()"><i class="fa fa-check"></i>{{'确定' | dyLanguage}}</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- END PAGE CONTENT WRAPPER -->